namespace DPLParser.DPLILCode
{
    /// <summary>
    /// Any DPL instruction in the DPL language can be reduced to a list of simple
    /// DPLReducedInstruction. 
    /// A DPLReducedInstruction is of the following form:
    /// FUNC1(FUNC2(FUNC3(A))) = FUNC4(FUNC5(FUNC6(B^X))) where X can be an integer, or an 
    /// integer inverse of the form 1/X.
    /// Indeed, the right-hand side element set like {A,B,C} can always be split in 
    /// several items; there will ba as many DPLReducedInstruction as there are some items
    /// in the right hand side set.
    /// </summary>
    public class DPLComparisonInstruction
    {
        public DPLFunctionCall LeftCall
            {
            get; set;
        }

        public DPLVariable LeftVariable
        {
            get;
            set;
        }

        public DPLFunctionCall RightCall
        {
            get;
            set;
        }

        public DPLVariable RightVariable
        {
            get;
            set;
        }

        public int RightVariableExposure
        {
            get; set;
        }

        /// <summary>
        /// If RightVariableExposureIsInverse = true, we have this^(1/RightVariableExposure) DPL Variable.
        /// Otherwise, we have a this^RightVariableExposure DPL Variable.
        /// </summary>
        public bool RightVariableExposureIsInverse
        {
            get;
            set;
        }

        /// <summary>
        /// Operator for the current reduced instruction
        /// </summary>
        public AbstractDPLOperator DPLInstructionOperator
        {
            get;
            set;
        }
    }
}